package com.spring.cloud.module.menu;

import com.google.common.collect.Lists;
import com.spring.cloud.module.common.core.BaseObject;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
 * Created by sunwei on 2015/8/20 0020.
 */
public class FirstMenu extends BaseObject{
    /**
	 * 
	 */
	private static final long serialVersionUID = 5112763828366691873L;
	private String menuId;
    private String menuName;
    private String iconCls;
    private String url = "";
    private String display = "true";
    private String parentId;

    private String menuType = "CMS";

    private List<SecondMenu> list = Lists.newArrayList();

    public void addSecondMenu(SecondMenu menu) {
        if(null != menu && Boolean.valueOf(StringUtils.isEmpty(menu.getDisplay())?"true":menu.getDisplay())){
            list.add(menu);
        }
    }

    public void removeSecondMenu(SecondMenu menu) {
        list.add(menu);
    }

    public List<SecondMenu> getSecondMenuList() {
        return list;
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getMenuName() {
        return menuName;
    }

    public void setMenuName(String menuName) {
        this.menuName = menuName;
    }

    public String getIconCls() {
        return iconCls;
    }

    public void setIconCls(String iconCls) {
        this.iconCls = iconCls;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getDisplay() {
        return display;
    }

    public void setDisplay(String display) {
        this.display = display;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getMenuType() {
        return menuType;
    }

    public void setMenuType(String menuType) {
        this.menuType = menuType;
    }
}
